
#include <reg24le1.h>
#include "app.h"

code const unsigned char test_string[]="this is a test string from le1 uart! ";

void main(void)
{
unsigned char tmp=0,flag=0;
unsigned int  num=0;
io_config();
uart_init();
delayx(100);
puts(test_string);
while(1)
 {

if(RI0==1)
{  
   tmp=S0BUF;
   RI0=0;
   S0BUF=tmp;
   while(!TI0);
   TI0=0;
}

num++;
if(num<2000)
flag=1;
else
flag=0;
num%=10000;
LED0=flag;		

 }

}
